from django.http import HttpResponse
from django.shortcuts import render


def hello(request):
    return HttpResponse("Hello world ! ")


def runoob(request):
    context = {}
    context['hello'] = 'hello zyyp'
    views_dict = {"name": "菜鸟教程", "age": 18}
    return render(request, 'runoob.html', {"views_dict": views_dict,"hello":"hello"})


def user(request):
    view_name = "用户主页Sweet Heart"
    view_list = ["用户名","用户年龄","用户注册日期",False]
    view_url = "<a href='https://www.baidu.com'>百度一下 你就知道</a>"
    list_empty = []
    return render(request, "user.html", {"name": view_name,"view_list":view_list,
                                         "view_url":view_url,"list_empty":list_empty})
